package com.lieve.config;

import com.lieve.bean.Apple;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @author sunlijiang
 * @date 2020/4/23
 */
@Configuration
@ComponentScan("com")
public class AppConfig {

    @Bean(initMethod = "initMethod", destroyMethod = "destroyMethod")
    public Apple apple() {
        return new Apple("red");
    }
}
